<?php
class IndexAction extends PublicAction
{
    public function index()
    {
       $news = D("News");
       if($_GET["categoryhash"])
           $news->where("categoryhash={$_GET['categoryhash']}");
       $newsList = $news->limit(10)->findAll();
        $this->assign("newsList",$newsList);
       $this->display();
    }
}
?>